package com.ydc.ln.tutorial.web.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class Hello extends TagSupport {
	
	private String myMessage;

	@Override
	public int doStartTag() throws JspException {
		try {
			JspWriter out = pageContext.getOut();
			out.println("Hello World Use Tag Library");
			
			pageContext.setAttribute("Message", "Use TEI");
			this.setMyMessage("Not Use TEI");
		} catch (Exception e) {
			System.err.print("Hello Tag Error !----" + e);
		}
		// 告诉Container，不需要对本体内容(body content)做处理
		return TagSupport.SKIP_BODY;
	}

	public String getMyMessage() {
		return myMessage;
	}

	public void setMyMessage(String message_NO_TEI) {
		myMessage = message_NO_TEI;
	}
	
	

}
